package chatclient_01.dialogs;

import chatclient_01.ChatClient;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.GroupLayout;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JScrollPane;
import javax.swing.JTextPane;
import javax.swing.LayoutStyle;

public class HelpDialog extends JDialog {

  private static final long serialVersionUID = 1L;
  private JButton jButton1;
  private JScrollPane jScrollPane1;
  private JTextPane jTextPane1;

  public HelpDialog(ChatClient parent, boolean modal) {
    super(parent, modal);
    initComponents();
  }

  private void initComponents() {
    this.jScrollPane1 = new JScrollPane();
    this.jTextPane1 = new JTextPane();
    this.jButton1 = new JButton();

    setTitle("Help");
    setLocationByPlatform(true);
    setResizable(false);

    this.jTextPane1.setEditable(false);
    this.jTextPane1.setFont(new Font("Ravie", 0, 14));
    this.jTextPane1.setText("Help for Plants and Zombies Game.\n\n When the Zombies show up, just sit there and don't do anything. You win the game when the Zombies get to your houze,\n\n    -this help section was brought to you by the Zombies");
    this.jScrollPane1.setViewportView(this.jTextPane1);

    this.jButton1.setText("OK");
    this.jButton1.addActionListener(new ActionListener() {

      public void actionPerformed(ActionEvent evt) {
        HelpDialog.this.jButton1ActionPerformed(evt);
      }
    });
    GroupLayout layout = new GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(this.jScrollPane1, -2, 356, -2).addGroup(GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addContainerGap(276, 32767).addComponent(this.jButton1, -2, 70, -2).addContainerGap()));

    layout.setVerticalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addComponent(this.jScrollPane1, -2, 278, -2).addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED).addComponent(this.jButton1).addContainerGap(-1, 32767)));

    pack();
  }

  private void jButton1ActionPerformed(ActionEvent evt) {
    setVisible(false);
  }
}